# 1.导包
import time
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
# 2.打开浏览器（创建浏览器驱动对象）
service = Service(r'F:\python 3.12\chromedriver.exe')
driver = webdriver.Chrome(service=service)
# 3.输入网址
driver.get("http://121.43.169.97:8848/pageA.html")

# 页面操作
driver.find_element(By.XPATH, "//*input[@name='userA']").send_keys("admin")
driver.find_element(By.XPATH,"//*[id='passwordA']").send_keys("123456")

# 属性与逻辑结合
driver.find_element(By.XPATH,"//*[@type='button' and @value='prompt']").click()

time.sleep(90)

driver.quit()
